home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
ka9q
/
src890906.arc
/
NETUSER.H
< prev
next >
Wrap
C/C++ Source or Header
|
1989-08-18
|
1KB
|
46 lines
/* Global structures and constants needed by an Internet user process */
#ifndef NCONN
#include "global.h"
#define NCONN 20 /* Maximum number of open network connections */
extern int32 Ip_addr; /* Our IP address */
extern int Net_error; /* Error return code */
#define NONE 0 /* No error */
#define CON_EXISTS 1 /* Connection already exists */
#define NO_CONN 2 /* Connection does not exist */
#define CON_CLOS 3 /* Connection closing */
#define NO_MEM 4 /* No memory for TCB creation */
#define WOULDBLK 5 /* Would block */
#define NOPROTO 6 /* Protocol or mode not supported */
#define INVALID 7 /* Invalid arguments */
/* Codes for the tcp_open call */
#define TCP_PASSIVE 0
#define TCP_ACTIVE 1
#define TCP_SERVER 2 /* Passive, clone on opening */
/* Socket structure */
struct socket {
int32 address; /* IP address */
int16 port; /* port number */
};
#define NULLSOCK (struct socket *)0
/* Connection structure (two sockets) */
struct connection {
struct socket local;
struct socket remote;
};
/* In domain.c: */
int32 dresolve __ARGS((char *name));
int32 resolve __ARGS((char *name));
/* In netuser.c: */
int32 aton __ARGS((char *s));
char *inet_ntoa __ARGS((int32 a));
char *pinet __ARGS((struct socket *s));
#endif /* NCONN */